package kr.hkit.powerjava.chapter11;

class Person {
	public String name;
	public String addres;
	public String call;

	public Person() {}

	public Person(String name, String addres, String call) {
		this.name = name;
		this.addres = addres;
		this.call = call;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddres() {
		return addres;
	}

	public void setAddres(String addres) {
		this.addres = addres;
	}

	public String getCall() {
		return call;
	}

	public void setCall(String call) {
		this.call = call;
	}
}

class Customer extends Person {
	public int num;
	public int point;
	
	public Customer() {}

	public Customer(String name, String addres, String call, int num, int point) {
		super(name, addres, call);
		this.num = num;
		this.point = point;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public int getPoint() {
		return point;
	}

	public void setPoint(int point) {
		this.point = point;
	}
	
	@Override
	public String toString() {
		return String.format(
				"Customer [num=%s, point=%s, name=%s, addres=%s, call=%s]",
				num, point, name, addres, call);
	}

	public static void main(String[] args) {
		Person papa = new Person();
		papa.setAddres("산격동");
		papa.setCall("010-0000-0001");
		papa.setName("김상속");
		
		Customer son = new Customer("name", "addres", "call", 01, 200000);
		
		System.out.println(son.toString());
	}
}